home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: dliska@ix.netcom.com (David Liska)
- Newsgroups: comp.lang.c++
- Subject: Precision question
- Date: Sat, 13 Jan 1996 14:15:44 GMT
- Organization: Netcom
- Message-ID: <4d8f00$t4a@cloner2.ix.netcom.com>
- NNTP-Posting-Host: ix-dc6-11.ix.netcom.com
- X-NETCOM-Date: Sat Jan 13 6:18:40 AM PST 1996
- X-Newsreader: Forte Free Agent 1.0.82
-
- I am starting to learn C++ and am a bit confused about how it handles
- variable precision. I have the following lines of code:
-
- check1=num1/num2;
- check2=int(check1);
- if (check1 == check2)
-
- The purpose is to see if num1 is divisible by num2 with no remainder.
- This works fine until I get into the 65k range. At this point, it
- calculates every number from there on as "divisible".
-
- I've tried setting check1 and check2 to long double, but it seems to
- make no difference.
-
- Any ideas?
-
- Dave
-
-